package com.srlg.webflux.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

import java.time.Instant;

/**
 * @desc:
 * @author: srlg li
 * @date: 2024/1/7 15:47
 */
@Table("t_book")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Book {

    @Id
    private Long id;

    private String title;

    private Long authorId;

    // 在响应式中不能用Date
    private Instant publishTime;

    private Author author;
}
